/*
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2022-08-09 14:13:35
 * @LastEditors: 李天惊 uf_lee@163.com
 * @LastEditTime: 2022-08-23 16:37:11
 * @FilePath: \ahbs\uc_sys\src\api\my\index.ts
 * Copyright (c) 2022 by 李天惊 uf_lee@163.com, All Rights Reserved.
 */
import { useAxios } from '@/hooks/web/useAxios'

const request = useAxios()

import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 我的用户信息
export const ucMyInfoApi = () => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucMyInfo',
      data: {}
    }
  })
}

// 我的菜单权限
export const ucMyMenuAuthorityApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucMyMenuAuthority',
      data: data
    }
  })
}

// 我的应用权限
export const ucMyAppAuthorityApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucMyAppAuthority',
      data: data
    }
  })
}
